import Vue from 'vue'
import Router from 'vue-router'
import login from '@/components/login'
import home from '@/components/home'
import usrList from '@/components/usrList'
import shopOrderList from '@/components/shopOrderList'
import shopList from '@/components/shopList'
import config from "@/config.json"

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: `${config.ui_base_path}`,
      name: 'login',
      component: login
    },{
    	path: `${config.ui_base_path}home`,
			name: 'home',
			component: home,

			children: [{
				path: "usrList",
				component: usrList
			}, {
				path: "shopList",
				component: shopList
			},{
        path: "shopOrderList",
        component: shopOrderList
      }]
    }
  ]
})
